package com.github.llyb120.performance;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;

/**
 * @Author: Administrator
 * @Date: 9/13/2021 7:02 PM
 */
@Configuration
public class GroovyEngine {

    @Bean
    public ScriptEngine engine(){
        ScriptEngineManager factory = new ScriptEngineManager();
        ScriptEngine engine = factory.getEngineByName("groovy");
        return engine;
    }


}
